﻿<%@ Page Title="Homepagina" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>

<asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent">
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
                <h1><%: Title %>.</h1>
                <h2>Groep16 - Festivalinfo</h2>
            </hgroup>
            <p>
                Welkom op de webApp van Groep16!
            </p>
        </div>
    </section>
</asp:Content>
<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <asp:ListView ID="ListView1" runat="server" DataKeyNames="fest_id" DataSourceID="SqlDataSource1" GroupItemCount="3">
        <AlternatingItemTemplate>
            <td runat="server" style="">
                <asp:Label ID="fest_naamLabel" runat="server" Text='<%# Eval("fest_naam") %>' Font-Bold="true" Font-Size="X-Large" />
                <br />
                <asp:Label ID="fest_locatieLabel" runat="server" Text='<%# Eval("fest_locatie") %>' />
                <br />
                <asp:Label ID="fest_datumLabel" runat="server" Text='<%# Eval("fest_datum") %>' />
                <br /></td>
        </AlternatingItemTemplate>
        <EditItemTemplate>
            <td runat="server" style="">
                <asp:TextBox ID="fest_naamTextBox" runat="server" Text='<%# Bind("fest_naam") %>' />
                <br />fest_locatie:
                <asp:TextBox ID="fest_locatieTextBox" runat="server" Text='<%# Bind("fest_locatie") %>' />
                <br />fest_datum:
                <asp:TextBox ID="fest_datumTextBox" runat="server" Text='<%# Bind("fest_datum") %>' />
                <br />fest_duur:
                <asp:TextBox ID="fest_duurTextBox" runat="server" Text='<%# Bind("fest_duur") %>' />
                <br />
                <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="Update" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Cancel" />
                <br /></td>
        </EditItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="">
                <tr>
                    <td>No data was returned.</td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <EmptyItemTemplate>
<td runat="server" />
        </EmptyItemTemplate>
        <GroupTemplate>
            <tr id="itemPlaceholderContainer" runat="server">
                <td id="itemPlaceholder" runat="server"></td>
            </tr>
        </GroupTemplate>
        <InsertItemTemplate>
            <td runat="server" style="">fest_naam:
                <asp:TextBox ID="fest_naamTextBox" runat="server" Text='<%# Bind("fest_naam") %>' />
                <br />fest_locatie:
                <asp:TextBox ID="fest_locatieTextBox" runat="server" Text='<%# Bind("fest_locatie") %>' />
                <br />fest_datum:
                <asp:TextBox ID="fest_datumTextBox" runat="server" Text='<%# Bind("fest_datum") %>' />
                <br />fest_duur:
                <asp:TextBox ID="fest_duurTextBox" runat="server" Text='<%# Bind("fest_duur") %>' />
                <br />
                <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" />
                <br />
                <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="Clear" />
                <br /></td>
        </InsertItemTemplate>
        <ItemTemplate>
            <td runat="server" style="">
                <asp:Label ID="fest_naamLabel" runat="server" Text='<%# Eval("fest_naam") %>'  Font-Bold="true" Font-Size="X-Large" />
                <br />
                <asp:Label ID="fest_locatieLabel" runat="server" Text='<%# Eval("fest_locatie") %>'/>
                <br />
                <asp:Label ID="fest_datumLabel" runat="server" Text='<%# Eval("fest_datum") %>' />
                <br /></td>
        </ItemTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="groupPlaceholderContainer" runat="server" border="0" style="">
                            <tr id="groupPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style=""></td>
                </tr>
            </table>
        </LayoutTemplate>
        <SelectedItemTemplate>
            <td runat="server" style="">
                <asp:Label ID="fest_naamLabel" runat="server" Text='<%# Eval("fest_naam") %>' />
                <br />
                <asp:Label ID="fest_locatieLabel" runat="server" Text='<%# Eval("fest_locatie") %>' />
                <br />
                <asp:Label ID="fest_datumLabel" runat="server" Text='<%# Eval("fest_datum") %>' />
                <br /></td>
        </SelectedItemTemplate>
    </asp:ListView>
    <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="SqlDataSource2" DataTextField="band_naam" DataValueField="band_id" AutoPostBack="true">
    </asp:DropDownList>
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource3" Height="50px" Width="125px">
        <Fields>
            <asp:BoundField DataField="band_naam" HeaderText="Bandnaam:" SortExpression="band_naam" />
            <asp:BoundField DataField="band_soortMuziek" HeaderText="Genre:" SortExpression="band_soortMuziek" />
            <asp:BoundField DataField="band_url" HeaderText="Website:" SortExpression="band_url" />
        </Fields>
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT [band_id], [band_naam] FROM [bands]"></asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT [band_naam], [band_soortMuziek], [band_url] FROM [bands] WHERE ([band_id] = @band_id)">
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList1" Name="band_id" PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:groep16_festivalsConnectionString %>" SelectCommand="SELECT * FROM [festivals]"></asp:SqlDataSource>
&nbsp; 
</asp:Content>